{{define "title"}}Manage File - Admin{{end}}

{{define "body"}}
	<div>
		<h2>File List</h2>
		{{if .file_list}}
		<table class="table table-bordered table-hover">
			<thead>
				<tr>
				<th>#</th>
				<th>name</th>
				<th>type</th>
				<th>x</th>
				</tr>
			</thead>
			<tbody>
				{{range $i, $f := .file_list}}
				<tr>
					<td>{{$i}}</td>
					<td>{{$f.Filename}}</td>
					<td>{{$f.ContentType}}</td>
					<td><a href="/file/{{$f.ID}}/{{$f.Filename}}" title="Download {{$f.Filename}}"><i class="icon-download"></i></a></td>
				</tr>
				{{end}}
			</tbody>
		</table>
		{{else}}
		<div>No file Found</div>
		{{end}}
	</div>
	<div>
		<form action="{{ .upload_url }}" method="POST" enctype="multipart/form-data">
		<fieldset>
			<legend>upload file</legend>
			<input type="file" name="file">
			<button type="submit" name="submit" class="btn btn-primary">Submit</button>
		</fieldset>
		</form>
	</div>
{{end}}

{{define "extrahead"}}{{end}}

{{define "extrabody"}}{{end}}
